
package ProOF.apl.problems.real.functions;

import ProOF.com.LinkerParameters;
import java.lang.Math;
/**
 *
 * @author Lucas
 */
public class RealFuncMCP extends aRealFunction{
	
	@Override
	public void parameters(LinkerParameters link) throws Exception {

	}
	
	@Override
	public int dimension() {
		return 4;
	}
	
	@Override
	public double min( int i ) {
		return -1;
	}
	
	@Override
	public double max( int i ) {
		return 1;
	}

	@Override
	public double f(double[] x) throws Exception {
		check(x);
		
		return Math.pow( Math.exp(x[0]) - x[1] , 4) + 100*Math.pow(x[1] - x[2], 6) 
					+ Math.pow(Math.tan(x[2] - x[3]), 4) + Math.pow(x[0],8);
	}

	@Override
	public String name() {
		return "MCP";
	}

	@Override
	public String description() {
		return "Miele and Cantrell Problem";
	}	
}
